home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / RAND / ALL95.LZH / transcript_1108 / text0040.txt < prev    next >
Encoding:
Text File  |  1995-11-26  |  10.9 KB  |  217 lines

  1.  
  2. Hello 
  3. all!
  4.  
  5. This is just Doug sending out his first contribution to the BAD MOOD 
  6. mailing list, and letting everyone know my thoughts on the situation with 
  7. the project (and to clear up a few points of confusion - for me at 
  8. least!).
  9.  
  10. I would first like to congratulate everyone involved for attempting such a 
  11. daring feat of technology on a platform no-one really believes is capable 
  12. of sustaining it (except us of course!) and for sticking at it long enough 
  13. to make it at least a possible - if not probable 
  14. event.
  15.  
  16. Much like everyone else, I can't spend all of my waking hours on this 
  17. project (although it seems like it of late) as I have my work and other 
  18. menial problems to deal with throughout each week. However, I do intend to 
  19. write as many 'units' as possible - and offer them up as candidates for use 
  20. in BAD MOOD. I don't expect everything to be used, but I'll do my best to 
  21. make sure everything contributed is of the highest 
  22. quality.
  23.  
  24. Here are some thoughts, suggestions and personal opinions on the project so 
  25. far.... 
  26.  
  27.  
  28. 1) The sourcecode initially offered up to both Dave Murphy and myself was 
  29. only partially converted to assembly, and partially disassembled 'C'. We 
  30. have spent most of our time rewriting all of this code (including the 
  31. optimised code) - not for speed - but in order to understand how it works. 
  32. There was nothing wrong with the optimisations already made, but to leave 
  33. them unchanged would mean a gap in our understanding of those parts of the 
  34. program. There is only a small fragment of the code I have not finished 
  35. rewriting and I intend to have this cracked within a day or so. I do not 
  36. offer 'replacements' for the optimisations which were there already, as I 
  37. am not about to claim that my own optimisations are any better!, but 
  38. instead offer the source I have produced as a basis for understanding the 
  39. whole program. Basically, I hope people can use what I have written to 
  40. understand the principles in operation inside the Doom core and to allow 
  41. them to write their own replacement 'modules' for use later on in 
  42. development.
  43.  
  44. 2) The code we have written, although as fast as we can make it without 
  45. affecting readability & presentability (i.e. no code-towers, precalc tables 
  46. and generated instruction sequences), is not optimised in the classical 
  47. sense. In other words - we haven't gone on a cycle-shaving excercise. I 
  48. expect somebody else might take it upon themselves to do this in the 
  49. future. I intend to write things clearly so that anyone can grasp what is 
  50. going on in there, and I will be depending mostly on data organization and 
  51. algorithmic improvement, as this is where most of the speed will come from 
  52. (including the DSP of course). I will make optimisations as I go, so long 
  53. as it does not affect clarity & limit future modification. The only 
  54. exception to this rule is the texture mapping at a pixel-level. This has to 
  55. be damn fast to say the least, and I will do my best to achieve this. This 
  56. means it might end up looking a bit nasty as a result. I don't expect this 
  57. to be a problem, and I can produce a simpler version for those who want to 
  58. mess with the 
  59. technique.
  60.  
  61. 3) It is important to note that the original 'C' implementation of the 
  62. display engine is incomplete, and can never work correctly with floors & 
  63. ceilings without some minor additions. I have made these modifications 
  64. (although they are temporary - pending a new column-building unit) and will 
  65. explain them in detail with the source. I just don't want everyone looking 
  66. for bugs in their own versions of the display code that are actually down 
  67. to missing fragments of the drawing process! These 'missing fragments' are 
  68. not down to the lack of texturing or lighting effects, but rather a 'crack' 
  69. in the clipping algorithm. Bear this in 
  70. mind!
  71.  
  72. 4) I would suggest that the organization of the program is not helping the 
  73. speed situation - the 68030's cache is being thrashed 98% of the time 
  74. inside the Binary Space Partitioning Tree and all of it's nested child 
  75. functions as these functions are called in a chained, linear fashion. The 
  76. cache doesn't get used, and the 68030's contribution to these areas in 
  77. future versions of the project is going to be hampered by this 
  78. problem.
  79. I intend to reorganize the program to use a different (non-recursive) 
  80. tree-descent algorithm and force it to build tracking-lists for the sectors 
  81. to be drawn in the order the tree produces them. The NodeInCone functions 
  82. of the tree module (which has been now been redesigned completely to use 
  83. projection and other tricks) will be implemented on the DSP, which will 
  84. allow the entire tree-descent algorithm to fit inside the instruction 
  85. cache, and possibly even gain some parallelism with the DSP. Processing of 
  86. SSectors & Segs will be turned into generic 'loops' where the 3D & 2D 
  87. transformations can occur inside the cache, and without thrashing CPU 
  88. registers. The small overhead of reading/writing pointer lists & coordinate 
  89. groups will be more than eliminated by the greatly reduced instruction 
  90. fetch times. I have planned most (but not all) of the ordering required to 
  91. make this work and this will be my next task after the source 
  92. conversion.
  93.  
  94. 5) I believe it would be a good idea to reserve the DSP for the heavy 
  95. arithmetic involved in 3D transformations, 2D projection, z-clipping, 
  96. right/left side of line calculations, edgebuffer generation, filling & 
  97. scanning the wall occlusion list, initial texture index calculations, and 
  98. bucket management for floors & possibly walls (depending on available space 
  99. inside the DSP). This is not an exhaustive list, but to clarify the 
  100. situation, I would like to suggest some areas to AVOID using the DSP. These 
  101. areas would be sound-fx, music, WAD file management, sector & linedef 
  102. management, enemy intelligence, BSP tree walking and any other generalised 
  103. ram-intensive or random-access job like those stated. To use the DSP for 
  104. the above would eliminate the ability to use it for the jobs where it is 
  105. really needed - and would save most time. I can clarify my reasons for 
  106. stating these suggestions if anyone finds this disagreeable. I would like 
  107. to stress that using the DSP for in-game sound would be a VERY bad 
  108. idea!
  109.  
  110. 6) The mathematical accuracy of the program as a whole is too low to be 
  111. turned into a game. It's fine as a demo, but would look nowhere as smooth 
  112. as PC doom without being improved. An example is the player's location, 
  113. which is represented by 16-bit words. I suggest that all coordinate 
  114. information (except WAD-sourced wall coordinates) for the player, enemies 
  115. and things should be converted to 32-bit realnumber format - that is 16.16 
  116. fractional numbers. This offers fast, accurate vector arithmetic and a much 
  117. smoother game. I will strive to implement this feature into the display 
  118. engine, which will allow for sub-pixel positioning of textures - just like 
  119. PC 
  120. Doom!
  121.  
  122. 7) I have written a fast (clipped & masked) scaled truecolour sprite 
  123. routine for another (previous) job which suits BAD MOOD perfectly for 
  124. drawing scaled THINGS on the floor and enemy objects. I have been tempted 
  125. to get the current engine to draw a Doom 'Imp' in the middle of each sector 
  126. using this routine, and I might do this before posting the code onto the 
  127. Internet. This does not mean I expect this code to be used, as the clipping 
  128. maths can be optimised a little (although it won't save much time!) but it 
  129. lets everyone play about with ideas without additional grief of writing 
  130. their own sprite 
  131. routine.
  132.  
  133. 8) I would like to apologise to some of the BAD MOOD crew for pointing out 
  134. to Magnus Kollberg that the floor/roof bug was introduced to the code 
  135. through recent assembly optimisations (Sorry guys!) - this actually turned 
  136. out to be Jake Hill's fault when he put the algorithm together in the 
  137. original 'C' source! Unfortunately though, there were other bugs introduced 
  138. through optimisations (signed word-addressing on a big WAD file!) so it's 
  139. not such a completely unfounded statement. :) These bugs have been sorted 
  140. out in the latest version of my 
  141. source.
  142.  
  143. 9) Dave Murphy has written a new WAD file parser which takes command line 
  144. parameters, and we are using this at the moment. Others may not want to use 
  145. this parser for their own reasons (they might have their own), and Dave has 
  146. left the code interchangeable in case somebody wants to swap the modules 
  147. about. I don't see any problems either way, and the more versions of 
  148. something there are - the more people obviously understand it! 
  149. :)
  150.  
  151. 10) I think it's going to be too difficult to coordinate different people 
  152. working on different parts of the project at the same time, and it 
  153. certainly takes the fun out of it - which is bad news for a freeware 
  154. project. So it might be best for everyone to write the bits they want, and 
  155. offer them up for selection later on. This way, everything gets used 
  156. because it's the best final routine for the job, rather than because Mr 'X' 
  157. happened to be working on it. This does of course mean that some less 
  158. experienced members of the crew who are perhaps more familiar with 'C' or 
  159. even just the game side of the Doom engine might get a bit left out, but I 
  160. believe that even the most advanced parts of the program are based on the 
  161. groundwork of others who didn't spend so long on the problem themselves - 
  162. and the people who spend most of their time on the REALLY hard parts don't 
  163. have time to do the other bits, which are just as important at the end of 
  164. the day - and are definitely more abundant! There is plenty of work to go 
  165. round, especially considering we are tackling what is probably the most 
  166. advanced piece of code ever to hit the Atari platform (if we are to 
  167. succeed!).
  168.  
  169. 11) I don't know yet exactly what direction the project is taking from a 
  170. game point of view - is to going to be Doom or a Doom clone? However it is 
  171. planned, are we going to get legal grief from ID, and do we have to get a 
  172. liscense? (I was quoted big figures by somebody close to ID for a 
  173. conversion to other platforms - even small 
  174. platforms).
  175.  
  176. Well, that about covers it from this end - hope this fills in some gaps and 
  177. lets people see what I want to. I just hope my ideas are not in conflict 
  178. with the general flow of 
  179. things.
  180.  
  181. I look forward to seeing any 
  182. feedback!
  183.  
  184. I am not in the mailing list just now (my internet supplier doesn't want 
  185. lots of mail exchanges taking place, as it's a free voluntary service!) so 
  186. any mail should be directed at my email address which is as 
  187. follows:-
  188.  
  189. dlittle@nest.demon.co.uk
  190.  
  191. Otherwise I won't be able to read replies unless Magnus Forwards them to me 
  192. (and he can't do this all the 
  193. time).
  194.  
  195. I can also be reached on NeST in any of the general Falcon or programming 
  196. echos.
  197.  
  198. Bye!
  199.  
  200. Doug.
  201.  
  202. ┌───────────────────────────────────────────────────────────────────────┐
  203. │  Black Scorpion Software Developments   ≡≡≡≡≡≡≡   Falcon030 & Jaguar  
  204. ├───────────────────────────────────────────────────────────────────────┤
  205. │  Doug Little   ≡   Neil Stewart   ≡   Nick Hesketh   ≡   Dave Encill  
  206. └───────────────────────────────────────────────────────────────────────┘
  207.  
  208. --
  209.  
  210.  
  211.  
  212.  
  213. ----- End Included Message -----
  214.  
  215.